import Layout from "@/layout";
import levels from "@/views/levels";

const reportRouter = {
  path: "/report/sales",
  component: Layout,
  redirect: "noRedirect",
  name: "report",
  alwaysShow: true,
  hidden: false,
  meta: {
    title: "报表管理",
    abbre: "报表",
    icon: "left_menu_report",
    navigation: "/report",
    id: "407"
  },
  children: [
    /* 批发端搬运而来的报表----开始 */
    {
      path: "/report/sales",
      component: levels,
      name: "sales_report",
      hidden: false,
      meta: {
        title: "销售报表",
        noCache: true,
        navigation: "/report/sales",
        icon: "sales_report"
      },
      children: [
        {
          path: "/report/sales",
          component: () => import("@/views/report/salesReport"),
          name: "sales_report_sales",
          hidden: true,
          meta: {
            title: "主报表",
            noCache: true,
            navigation: "/report/sales",
            icon: "sales_report"
          }
        },
        {
          path: "/report/sales/order",

          component: () =>
            import("@/views/report/salesReport/salesReportOrder"),
          hidden: true,
          name: "sales_report_order",
          meta: {
            title: "订单",
            noCache: true,
            navigation: "/report/sales",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/sales/user",
          component: () => import("@/views/report/salesReport/salesReportUser"),
          hidden: true,
          name: "sales_report_user",
          meta: {
            title: "用户",

            noCache: true,
            navigation: "/report/sales",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/sales/goods",
          component: () =>
            import("@/views/report/salesReport/salesReportGoods"),
          hidden: true,
          name: "sales_report_goods",
          meta: {
            title: "商品",
            noCache: true,
            navigation: "/report/sales",
            icon: "menu_big_data"
          }
        }
      ]
    },
    // 利润报表
    {
      path: "/report/profit",
      component: levels,
      name: "profit_report",
      hidden: false,
      meta: {
        title: "利润报表",
        noCache: true,
        navigation: "/report/profit",
        icon: "profit_report"
      },
      children: [
        {
          path: "/report/profit",
          component: () => import("@/views/report/profitReport"),
          name: "profit_report_profit",
          hidden: true,
          meta: {
            title: "主报表",
            noCache: true,
            navigation: "/report/profit",
            icon: "profit_report"
          }
        },
        {
          path: "/report/profit/day",
          component: () =>
            import("@/views/report/profitReport/profitReportDay"),
          hidden: true,
          name: "profit_report_day",
          meta: {
            title: "日报表",
            noCache: true,
            navigation: "/report/profit",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/profit/user",
          component: () =>
            import("@/views/report/profitReport/profitReportUser"),
          hidden: true,
          name: "profit_report_user",
          meta: {
            title: "用户",
            noCache: true,
            navigation: "/report/profit",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/profit/goods",
          component: () =>
            import("@/views/report/profitReport/profitReportGoods"),
          hidden: true,
          name: "profit_report_goods",
          meta: {
            title: "商品",
            noCache: true,
            navigation: "/report/profit",
            icon: "menu_big_data"
          }
        }
      ]
    },
    // 采购报表
    {
      path: "/report/purchase",
      component: levels,
      name: "purchase_report",
      hidden: false,
      meta: {
        title: "采购报表",
        noCache: true,
        navigation: "/report/purchase",
        icon: "menu_big_data"
      },
      children: [
        {
          path: "/report/purchase",
          component: () => import("@/views/report/purchasingReport"),
          name: "purchase_report_purchase",
          hidden: true,
          meta: {
            title: "主报表",
            noCache: true,
            navigation: "/report/purchase",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/purchase/order",
          component: () =>
            import("@/views/report/purchasingReport/purchasingReportOrder"),
          hidden: true,
          name: "purchase_report_order",
          meta: {
            title: "采购单",
            noCache: true,
            navigation: "/report/purchase",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/purchase/sku",
          component: () =>
            import("@/views/report/purchasingReport/purchasingReportSku"),
          hidden: true,
          name: "purchase_report_sku",
          meta: {
            title: "商品",
            noCache: true,
            navigation: "/report/purchase",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/purchase/user",
          component: () =>
            import("@/views/report/purchasingReport/purchasingReportUser"),
          hidden: true,
          name: "purchase_report_user",
          meta: {
            title: "采购员/供应商",
            noCache: true,
            navigation: "/report/purchase",
            icon: "menu_big_data"
          }
        }
      ]
    },
    // 损耗报表
    {
      path: "/report/loss",
      component: levels,
      name: "loss_report",
      hidden: false,
      meta: {
        title: "损耗报表",
        noCache: false,
        navigation: "/report/loss",
        icon: "menu_big_data"
      },
      children: [
        {
          path: "/report/loss",
          component: () => import("@/views/report/lossReport"),
          name: "loss_report_loss",
          hidden: true,
          meta: {
            title: "主报表",
            noCache: true,
            navigation: "/report/loss",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/loss/all",
          component: () => import("@/views/report/lossReport/lossAll"),
          hidden: true,
          name: "loss_report_all",
          meta: {
            title: "总损耗",

            noCache: true,
            navigation: "/report/loss",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/loss/purchase",
          component: () => import("@/views/report/lossReport/lossPurchase"),
          hidden: true,
          name: "loss_report_purchase",
          meta: {
            title: "采购损耗",
            noCache: true,
            navigation: "/report/loss",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/loss/inventory",
          component: () => import("@/views/report/lossReport/lossInventory"),
          hidden: true,
          name: "loss_report_inventory",
          meta: {
            title: "盘点损耗",
            noCache: true,
            navigation: "/report/loss",
            icon: "menu_big_data"
          }
        },
        {
          path: "/report/loss/return",
          component: () => import("@/views/report/lossReport/lossReturn"),
          hidden: true,
          name: "loss_report_return",
          meta: {
            title: "退货损耗",
            noCache: true,
            navigation: "/report/loss",
            icon: "menu_big_data"
          }
        }
        // {
        //   path: "/report/loss/adjustment",
        //   component: () => import("@/views/report/lossReport/lossAdjustment"),
        //   hidden: true,
        //   name: "loss_report_adjustment",
        //   meta: {
        //     title: "调整损耗",
        //     noCache: true,
        //     navigation: "/report/loss",
        //     icon: "menu_big_data"
        //   }
        // },
      ]
    }
  ]
};

export default reportRouter;
